<template>
    <h3 style="text-align: center;">
        用户登录列表页面
    </h3>
    <table class="table table-bordered" border="1">
        <thead>
            <tr>
                <td>用户名称</td>
                <td>密码</td>
                <td>时间</td>
            </tr>
        </thead>
        <tbody>
            <tr v-for="item in Info" :key="item.T_Id">
                <td>{{item.T_Name}}</td>
                <td>{{item.T_Pwd.substring(0,4)+'***'}}</td>
                <td>{{item.T_Date.substring(0,10)}}</td>
            </tr>
        </tbody>
    </table>
</template>
<script setup lang="ts">
import { ref } from 'vue';  
const Info=ref([
    {
        T_Id:'',
    T_Name:'',
    T_Pwd:'',
    T_Date:'',
    }
])
import axios from 'axios';
import { onMounted } from 'vue';
onMounted(() => {
    ShowUser();
})
//显示
function ShowUser(){
    axios.get("https://localhost:44369/api/Userl/ShowUser")
    .then((res)=>{
        Info.value=res.data;
    })
    .catch
    ((err)=>{
        console.log(err);   
    })
}
</script>